<template>
  <div class="demo-title">skeleton/demo4</div>
  <div class="demo">
    <Switch v-model="checked" style="margin-bottom: 12px;" />
    <Skeleton width="250px" height="15px" :row="3" title animated avatar :visible="!checked">
      <div class="container">
        <img class="avatar" src="https://ssc-design-1311112663.cos.ap-guangzhou.myqcloud.com/design/logo.png" />
        <div class="right-content">
          <div class="title">SSC+ Design</div>
          <div class="desc">
            SSC+ Design 是 SSC 针对产品和数字体验的设计系统。该系统以 SSC+ 设计语言为基础，由工作代码、设计工具和资源以及人机界面指南组成。
          </div>
        </div>
      </div>
    </Skeleton>
  </div>
</template>

<script lang="ts" setup>
  import { ref } from 'vue'
  import Switch from '@sscd-mobile/switch'
  import Skeleton from '@sscd-mobile/skeleton'
  const checked = ref(true)
</script>

<style lang="less" scoped>
  .demo {
    padding: 24px 12px;
    background-color: #fff;
    .container {
      display: flex;
      .avatar {
        width: 50px;
        height: 50px;
      }
      .right-content {
        margin-left: 19px;
        display: flex;
        flex-direction: column;
        .title {
          font-size: 14px;
          color: rgba(51, 51, 51, 1);
        }
        .desc {
          margin-top: 10px;
          font-size: 12px;
          color: rgba(154, 155, 157, 1);
        }
      }
    }
  }
</style>
